home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 9383 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.3 KB

  1. Path: pagesat.net!abq-ros.com
  2. From: <bobakohl@abq-ros.com>
  3. Date: Sat, 9 Mar 96 20:20:06 -0600
  4. Newsgroups: comp.lang.c
  5. Subject: Re: Towers of Hanoi
  6. Message-ID: <tcpnntpd.16.3.9.20.20.6.2577039569.13293312@abq-ros.com>
  7. NNTP-Posting-Host: abq-ros.com
  8. X-MajorTCP-Version: MajorTCP/IP [1.85-8]
  9.  
  10. -=> Quoting Mhs:guusl@eiffel.com to ** All ** <=-
  11.  
  12.  Mh>
  13.  Mh> Craig Bellet wrote:
  14.  >
  15.  > Learning to program in C++. Assigned problem of moving four progressively
  16.  > larger rings sitting on a peg to another peg one ring at a time. The
  17.  > object is to move the stack of rings to another peg. A small ring may be
  18.  > placed upon a larger ring or an empty peg but not upon a larger ring.
  19.  
  20.  Mh> What ??? You do a) or b) but a) ??? How is that to work ???
  21.  
  22.   What he means to say, is that the larger rings must not be placed upon
  23.   a smaller ring.
  24.  
  25.  > A third peg is to facilitate this by temporarily holding rings. The
  26.  > solution involves recursion but I am unable to figure out the algorithm.
  27.  > Any thoughts?
  28.  
  29.    There is a way to do it, but I'd like to know if he is doing this as
  30.    a homework assignment. I'm not digging out a solution to satisfy a
  31.    homework assignment. Besides, the program I have is strictly in C and
  32.    not a C++ program.
  33.  
  34.  Mh> I can't see any algorithm for this particular problem either.
  35.  
  36.  Mh> If it would have been posted correctly, you won't get any answer here
  37.  Mh> for two sophicticated reasons:
  38.  Mh> a) it's about C++, this group is about C
  39.  Mh> b) it's an assignment, youo have to your homework yourself, as we did
  40.  Mh> that too.
  41.  
  42.  Mh> Guus
  43.  
  44.   Guus, we must stick to our guns about not answering homework
  45.   assignment for these kids. The idea is to "work on it at home", hence
  46.   the name "homework". This presupposes a unsupervised project to test
  47.   comprehension of the necessary C or C++ programming concepts. The kid
  48.   will not learn from this assignment if someone gives him the answer.
  49.   I've seen kids offer money to have their assignements done for them.
  50.   Ridiculous, I guess they want people to think for them. Check into a
  51.   Hotel, kid. They will do everything for you. You don't need to do
  52.   anything, but be prepared to pay dearly for your comfort. Maybe you
  53.   should go into Government work, they are looking for people just like
  54.   you. Guus, we can't give these kids everything on a silver platter.
  55.  
  56.   Bob Kohl
  57.  
  58. ___ Blue Wave/386 v2.21 [NR]
  59.  
  60.